// es6 解构：

const forest = {
    location: 'Earth',
    animal: 3,
    animalIsTypes: ['Lions', 'Tigers', 'Bears']
};
// es6 解构
const { location: location2, animal, animalIsTypes, nickname = '未命名' } = forest;
// location: location2————别名；nickname = '未命名'————新增属性=‘默认值’
console.log(location2, nickname); // Earth 未命名

const [lions, tigers, bears, dogs] = animalIsTypes;
console.log(lions, tigers, bears, dogs);// Lions Tigers Bears undefined
